package twentytwenty;

/**
 * @Author: Zahi
 * @Description:
 * @Date Created in 2020-12-12 13:25
 * @Modified By:
 */
public class ReverseString_344 {
    public static void main(String[] args) {

    }

    public void reverseString(char[] s) {
        if (s.length ==0){
            return;
        }
        int left = 0;
        int right= s.length - 1;
        while (left < right){
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
